package com.example.demo.repository;

import com.example.demo.model.Product;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductRepository extends MongoRepository<Product, String> {
    public List<Product> findByName(String name);

    public List<Product> findByPriceGreaterThan(double price);

    public List<Product> findByPriceBetween(double startPrice, double endPrice);
}
